package adv330;
import java.io.*;
import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest2 {
    public static void main(String[] args) {
        File f=new File("D:\\temp\\12-1.txt");
        //File f=new File("D:\\temp");
        boolean ok = f.delete();
        System.out.println("删除成功了？"+ok);
        File f2=new File("d:/temp/java762.txt");
        boolean r=f2.renameTo(new File("d:/temp/java83.txt"));
        System.out.println("改成功了？"+r);

        File f3 = new File("D:\\temp\\kecheng.html");
        String[] list = f3.list();//listFiles
        System.out.println(Arrays.toString(list));
    }
}
